package com.kim.openfeign.feign;

import com.kim.common.resp.Result;
import com.kim.openfeign.feign.impl.UserFeignImpl;
import com.kim.user.common.entity.SysUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * @author KimWu
 * @date 2020/5/25 17:33
 * @Description ：
 */
@FeignClient(value = "kim-user",fallback = UserFeignImpl.class)
public interface UserFeign {

    @GetMapping(value = "/user/findByUsername")
    Result<SysUser> findByUsername(@RequestParam String username);

    @GetMapping(value = "/user/insert")
    Result<String> userInsert(@RequestParam String userName);

    @GetMapping(value = "/role/insert")
    Result<String> roleInsert(@RequestParam String roleName);
}
